import React from 'react';
import {useLoaderData} from 'react-router-dom'
function Info(props) {
    const data = useLoaderData() //获取从路由请求的数据
    return (
        <div>
            Info
            {data.map(n=><div key={n.id}>id:{n.id} name:{n.name}</div>)}
        </div>
    );
}

export default Info;